<template>
	<view>
		<uni-nav-bar v-if="num==3" title="隐私政策" :border="false" left-icon="left" @clickLeft="back"></uni-nav-bar>
		<uni-nav-bar v-if="num==2" title="敏感个人信息知情同意书" :border="false" left-icon="left" @clickLeft="back"></uni-nav-bar>
		<uni-nav-bar v-if="num==1" title="共享清单" :border="false" left-icon="left" @clickLeft="back"></uni-nav-bar>
		<view class="  text-df" style="line-height: 50rpx;padding: 50rpx 20rpx;">

			<rich-text :nodes="content.content"></rich-text>

		</view>
	</view>
</template>

<script lang="ts">
	import { getAgreement } from '../../api/agreement/agreement'

	export default {
		data() {
			return {
				num: 3,
				title: [
					'共享清单',
					'敏感个人信息知情同意书',
					'隐私政策'
				],
				content: {
					agreementName: "隐私政策",
					agreementStatus: "1",
					content: ''
				}
			}
		},
		onLoad(option) {
			console.log(option.e)
			this.num = Number(option.e)
			getAgreement(this.title[this.num - 1]).then(res => {
				if (res.code === 200) {
					console.log(res.data)
					this.content = res.data
				}
			})
		},
		methods: {
			back() {
				uni.navigateBack()
			}
		}
	}
</script>

<style>
	page {
		background-color: #fff;

	}

	a:link,
	a:visited {
		color: black;
		width: 300px;
		text-decoration: underline;
		cursor: auto;
	}

	a:link:active,
	a:visited:active {
		color: black;
	}
</style>